package com.jt.utils;

import java.nio.charset.Charset;

/**
 * 常量工具
 *
 * @author wang xiao
 * date 2023/8/9
 */
public class JT808Const {
    /**
     * 默认字符集为GBK
     */
    public static final Charset DEFAULT_CHARSET = Charset.forName("GBK");
    /**
     * 消息分隔符
     */
    public static final byte PKG_DELIMITER = 0x7e;
    /**
     * 通用应答
     */
    public static final short TERMINAL_RESP_COMMON_ = 0x0001;
    /**
     * 终端消息分类 -心跳
     */
    public static final short TERMINAL_MSG_HEARTBEAT = 0x0002;
    /**
     * 终端消息分类 -注册
     */
    public static final short TERMINAL_MSG_REGISTER = 0x0100;
    /**
     * 终端消息分类 -注销
     */
    public static final short TERMINAL_MSG_LOGOUT = 0x0003;
    /**
     * 终端消息分类 -鉴权
     */
    public static final short TERMINAL_MSG_AUTH = 0x0102;
    /**
     * 终端消息分类 -位置
     */
    public static final short TERMINAL_MSG_LOCATION = 0x0200;
    /**
     * 服务器应答 -通用应答
     */
    public static final short SERVER_RESP_COMMON = (short) 0x8001;
    /**
     * 服务器应答 -注册应答
     */
    public static final short SERVER_RESP_REGISTER = (short) 0x8100;

    private JT808Const() {
    }
}
